/*
 * jxController Project (2014)
 * 
 * by Denilson Edinaldo Pinto
 * 
 * LGPL
 * Copyright (C) 2014
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.jxController.view.component;

import java.awt.Dimension;
import java.util.Collection;

import org.jxDao.dao.db.Driver;
import org.jxSwing.annotation.Unusable;
import org.jxSwing.component.comboBox.ComboBox;
import org.jxSwing.i18n.I18N;

/**
 * @author Denilson Edinaldo Pinto
 * @porject jxController
 * @package org.jxController.view.component
 * @date 04/09/2014 - 21:43:28
 */
public final class DriverComboBox extends ComboBox<Driver> {
	
	private static final long serialVersionUID = -8377346649434409523L;
	
	/**
	 * 
	 */
	public DriverComboBox() {
	
		super();
		
		initGUI();
	}
	
	/**
	 * 
	 */
	private void initGUI() {
	
		super.addItem(null);
		
		//
		for(final Driver driver : Driver.values()) {
			
			super.addItem(driver);
		}
		
		setSize(new Dimension(100, 25));
	}
	
	/**
	 * @param item
	 */
	@Override
	@Unusable
	@Deprecated
	public void addItem(final Driver item) {
	
		throw new RuntimeException(I18N.system().notSupportedOperation());
	}
	
	/**
	 * @param items
	 */
	@Override
	@Unusable
	@Deprecated
	public void addItems(final Collection<Driver> items) {
	
		throw new RuntimeException(I18N.system().notSupportedOperation());
	}
	
	/**
	 * @param items
	 */
	@Override
	@Unusable
	@Deprecated
	public void addItems(final Driver[] items) {
	
		throw new RuntimeException(I18N.system().notSupportedOperation());
	}
	
	/**
	 * @param items
	 */
	@Override
	@Unusable
	@Deprecated
	public void setItems(final Collection<Driver> items) {
	
		throw new RuntimeException(I18N.system().notSupportedOperation());
	}
	
	/**
	 * @param items
	 */
	@Override
	@Unusable
	@Deprecated
	public void setItems(final Driver[] items) {
	
		throw new RuntimeException(I18N.system().notSupportedOperation());
	}
}
